package cn.linjianhui.cluster.service.impl;

import cn.linjianhui.cluster.dao.RedPacketDao;
import cn.linjianhui.cluster.pojo.RedPacket;
import cn.linjianhui.cluster.service.RedPacketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class RedPacketServiceImpl implements RedPacketService {

    @Autowired
    private RedPacketDao redPacketDao;

    @Override
    @Transactional
    public RedPacket getRedPacket(Long id) {
        return redPacketDao.getRedPacket(id);
}

    @Override
    @Transactional
    public int decreaseRedPacket(Long id) {
        return redPacketDao.decreaseRedPacket(id);
    }
}
